import { Route, Routes } from "react-router-dom";
import { Layout } from "antd";
import routes from "@/routes/route";
import { useAppContext } from "@/context/AppContext";

const Content: React.FC = () => {
    return (
        <Layout.Content
            style={{
                flex: 1,
                padding: '24px',
                minHeight: '100%',
                overflow: 'auto',
            }}
        >
            <Routes>
                {routes.map((route, index) => (
                    <Route key={index} path={route.path} element={route.element} />
                ))}
            </Routes>
        </Layout.Content>
    );
}

export default Content;